const Application = require('saasjs');
const path = require('path')

const app = new Application();
const saas = Application.saas;
app.setProperty('fastifyOptionsPath', path.resolve(process.cwd() + '/config/', 'fastifyOptions.js'));

saas.hook.add('created', () => {
  const errorHandler = require('./config/error');
  saas.app.setErrorHandler(errorHandler);
})

app.start().then(() => {

});